Conversation
Since wxBitmap cannot be resized, resize the image before obtaining the bitmap
On macOS DC's Blit() and GetAsBitmap() methods cause another paint event, subsequently leading to a infinite recursion. The issue is discussed on wx's forums: https://discuss.wxpython.org/t/dc-blit-causes-evt-paint/23772/12 The solution is to perform offscreen rendering of the item window when a drag and drop operation is being performed.
|
After testing successfully for a few hours when building it locally on python 3.9.1 ended up with a similar crash: |
This looks like a different issue. Any hints for reproduction? |
|
I have been using Pyfa with this patch on macOS without any issues so far. |
|
Any update on merging this PR? |
Sorry, been AWOL for a while. Bump of wx version to 4.1.0+ has deep implications for many platforms so I won't be merging it yet. Unfortunately my windows installation is borked, but I will try to bump wx version first, fix outstanding issues for linux and mac (it's not as easy as it sounds, see #2179), request some testing for windows, and only then merge your PR. |
This is attempt to #2304 (fdb9d23). I have not tested this on anything but macOS.
Please see the commit for details on the cause and the solution.
I have also updated wxPython to 4.1.1 in an initial attempt to resolve the
Blit()issue, and have kept.b10599d contains a fix for an assertion on Retina MacBooks when scaling images to 2x.